package cn.com.qtgl.tenant.model.entity;

import cn.com.qtgl.tenant.model.enums.InitStatus;
import cn.melonlib.cores.commons.model.entity.StringIdEntity;
import cn.melonlib.cores.model.anno.ModelComment;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Data
@EqualsAndHashCode(callSuper = true)
@ModelComment("租户信息")
@Entity(name = "TenantInfo")
@Table(name = "sys_tenant_info")
public class TenantInfo extends StringIdEntity {

    @ModelComment("租户编码")
    private String tenantCode;

    @ModelComment("租户名称")
    private String tenantName;

    @Column
    @Lob
    @Basic(fetch = FetchType.LAZY)
    @ModelComment("租户配置")
    private String tenantConfig;

    @ModelComment("步骤")
    private Integer initStep=0;

    @Enumerated(EnumType.STRING)
    @ModelComment("初始化状态")
    private InitStatus status=InitStatus.START;

    @Column
    @Lob
    @Basic(fetch = FetchType.LAZY)
    @ModelComment("初始化信息")
    private String initMessages;
}
